package com.leapp.sk.viewdelegate.join

import android.text.TextUtils
import com.example.mvp.delegate.BaseAppDelegate
import com.example.mvp.view.SKTopBar
import com.leapp.sk.R
import com.leapp.sk.ui.activity.join.ToExamineActivity

/**
 * 等待审核视图托管层
 * @author  chaohaipeng  on 2018/7/12.
 */
class  ToExamineDelegate : BaseAppDelegate(){
    override fun initWidget() {
    }

    override fun initLayoutRes(): Int {
        return R.layout.activity_to_examine

    }
    /**
     * 设置标题栏
     */
    fun setTitle(title:String?){
        if (!TextUtils.isEmpty(title)){
            val jtb_ate= getView<SKTopBar>(R.id.jtb_ate)
            jtb_ate.setTitle(title)
        }
        setEvent()
    }

    /**
     * 设置设置事件
     */
    fun setEvent(){
        val jtb_ate= getView<SKTopBar>(R.id.jtb_ate)
        jtb_ate?.setEventInterface(object : SKTopBar.EventInterface{
            override fun leftOnClick() {
                getActivity<ToExamineActivity>().finish()

            }
            override fun rightOnClick() {
            }

        })
    }

}